#ifndef LOGCATSERVER_H
#define LOGCATSERVER_H

#include <QTcpServer>
#include <QList>

class LogCatServer : public QTcpServer
{
    Q_OBJECT
private:
    explicit LogCatServer(QObject *parent = 0);
public:

    static LogCatServer* getInstance(QObject *parent = 0);

    void sendLog(QByteArray log);
    void sendLog(QtMsgType type, const QMessageLogContext &context, const QString &msg);
    QString typeToName(QtMsgType type);
signals:

public slots:

protected slots:
    void manageClient();
private:
    static LogCatServer* m_instance;
    QList<QTcpSocket*> m_clientList;
};

#endif // LOGCATSERVER_H
